import request from "../request";

// 系统信息API
export function getInstanceConfig() {
  return request({
    url: "/api/ueinstance/getConfig",
    method: "get",
  });
}
export function setInstanceConfig(data) {
  return request({
    url: "/api/ueinstance/setConfig",
    method: "post",
    data,
  });
}

export function createInstance(data) {
  return request({
    url: "/api/ueinstance/create",
    method: "post",
    data,
  });
}

export function getInstanceList() {
  return request({
    url: "/api/ueinstance/list",
    method: "get",
  });
}

export function deleteInstance(data) {
  return request({
    url: `/api/ueinstance/delete`,
    method: "post",
    data,
  });
}

export function startInstance(data) {
  return request({
    url: `/api/ueinstance/start`,
    method: "post",
    data,
  });
}
export function stopInstance(data) {
  return request({
    url: `/api/ueinstance/stop`,
    method: "post",
    data,
  });
}

export function clearClient(data) {
  return request({
    url: `/api/ueinstance/clearClient`,
    method: "post",
    data,
  });
}

export function restartInstance(data) {
  return request({
    url: `/api/ueinstance/restart`,
    method: "post",
    data,
  });
}
export function getAvailableInstances() {
  return request({
    url: `/api/ueinstance/getAvailableInstances`,
    method: "get",
  });
}
// 其他系统相关API可以在这里添加
export default {
  getInstanceConfig,
  setInstanceConfig,
  createInstance,
  getInstanceList,
  deleteInstance,
  startInstance,
  stopInstance,
  clearClient,
  restartInstance,
  getAvailableInstances
};
